home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / cc_base / pak00_16bit_f.pk3 / postcard.tab.p < prev    next >
Text File  |  2003-01-03  |  4KB  |  142 lines

  1. {
  2.   X = -230;
  3.   Y = 60;
  4.   state = 0;
  5.   rest_x = -230;
  6.   expand_x = -10;
  7.   Hidden = 1;
  8.  
  9.   ScriptID = script {
  10.     @loaded {
  11.       resid plateID;
  12.       resid tabID;
  13.       int   plate_width;
  14.       
  15.       plateID = GuiChildByName(SELF, "plate");
  16.       tabID   = GuiChildByName(SELF, "tab");
  17.       plate_width = ResPropGetInt(plateID, "Width");
  18.       ResPropSetInt(SELF, "rest_x", - plate_width);
  19.       ResPropSetInt(tabID, "X", plate_width - 4);
  20.     }
  21.   }; 
  22.   
  23.   ChildID = {
  24.  
  25.  
  26.  
  27.     GuiAnimation("plate") {
  28.       AnimationID = "gui/dash/tab/plate/plate.pcx";
  29.       X = 0;
  30.       Width = 235;
  31.       Height = 180;
  32.     },
  33.  
  34.     GuiLayer("postcard_layer") {
  35.       X = 0;    
  36.       Y = 0;
  37.       ChildID = {
  38.             GuiTextInput("postcard_label") {
  39.           X = 20;
  40.           Y = 10;
  41.           Width = 190;
  42.           Height = 40;
  43.           WordWrap = TRUE;
  44.           InputDisabled = TRUE;
  45.           FontID = "font/tab_w_on_g.tf";
  46.           ScriptID = Script {
  47.             @show {
  48.               ResPropSetStr(SELF,"InputText",MangleSIDToStr(191/*"Photos"*/));        
  49.             }
  50.     
  51.           };
  52.         },
  53.             GuiTextInput("postcard_message") {
  54.           X = 20;
  55.           Y = 30;
  56.           Width = 190;
  57.           Height = 60;
  58.           WordWrap = TRUE;
  59.           InputDisabled = TRUE;
  60.           FontID = "font/verdana_9.tf";
  61.           ScriptID = Script {
  62.             @animate {
  63.  
  64.               resid Player;
  65.               resid Game;
  66.               str photo_current;
  67.              
  68.               Game = ResByName("Game");
  69.               Player = ResPropGetResID(ResByName("Game"),"game_cur_player");                         
  70.               
  71.               photo_current = ResPropGetStr(Player,"photo_current");
  72.               ResPropSetStr(SELF,"InputText",StrFormatStr(MangleSIDToStr(192/*"The last photo you picked up was %s. Click to see it in your photo album."*/), photo_current ));          
  73.             }
  74.           };
  75.         },
  76.         GuiButton("view_photo") {
  77.           X = 55;
  78.           Y = 120;
  79.           TextID = Mangle(193/*"View Photo"*/);
  80.           StyleID = "gui/dash/tab/button/tab.gbs";
  81.           FontID = "font/tab_button.tf";
  82.           Width = 120;
  83.           AutoSize = Height;
  84.           ScriptID = Script {
  85.             @activate {
  86.               resid rid;
  87.               rid = ResByName("laptop.gl/photos");
  88.               ResParseEvent(ResByName("dash.gl/GPS"),"@activate");
  89.               ResParseEvent(rid,"@activate");
  90.               ResPropSetResID(rid, "RadioGroupSelectedID", rid);
  91.               Mark("laptop");
  92.             }
  93.           }
  94.         }      
  95.       };
  96.     },
  97.     
  98.     GuiAnimation("tab") {
  99.       X = 239;
  100.       Y = 47;
  101.       AnimationID = "gui/dash/tab/postcard/postcard_off.pcx";
  102.       ScriptID = script {
  103.         @activate {
  104.           resid Parent;
  105.           resid Player;
  106.           resid Game;
  107.           Game = ResByName("Game");
  108.           Player = ResPropGetResID(ResByName("Game"),"game_cur_player");          
  109.           Parent = GuiParent(SELF);
  110.  
  111.           if ( ResPropGetResID(Player,"truck_tab_expanded") == Parent) {
  112.             ResPropSetResID(Player,"truck_tab_expanded",RES_INVALID);
  113.             ResPropSetInt(GuiSiblingByName("postcard_layer"),"Hidden",TRUE);
  114.           } else {
  115.             ResPropSetInt(GuiSiblingByName("postcard_layer"),"Hidden",FALSE);
  116.             ResPropSetResID(SELF,"AnimationID",ResByName("gui/dash/tab/postcard/postcard_off.pcx"));
  117.             ResPropSetResID(Player,"truck_tab_expanded",Parent);
  118.             GuiToFront(Parent);
  119.           }
  120.         }
  121.         @animate {
  122.           resid Parent;
  123.           int state;
  124.           resid Player;
  125.           resid Game;
  126.           Game = ResByName("Game");
  127.           Player = ResPropGetResID(ResByName("Game"),"game_cur_player");          
  128.           Parent = GuiParent(SELF);
  129.           
  130.           if ( ResPropGetResID(Player,"truck_tab_expanded") == Parent) {
  131.             ResPropSetInt(Parent,"X",ResPropGetInt(Parent,"expand_x"));
  132.             ResPropSetInt(GuiSiblingByName("plate"),"Hidden",FALSE);
  133.           } else {
  134.             ResPropSetInt(GuiSiblingByName("plate"),"Hidden",TRUE);
  135.             ResPropSetInt(Parent,"X",ResPropGetInt(Parent,"rest_x"));
  136.           }
  137.         }
  138.       }
  139.       }    
  140.   };
  141. }
  142.